# Use -keep for debuging
rdiff: rdiff.cu rdiff.h sum_sum2_kernel.h sum_sum2_kernel.cu corrcoefmatrix_kernel.h corrcoefmatrix_kernel.cu
	nvcc -o rdiff rdiff.cu sum_sum2_kernel.cu corrcoefmatrix_kernel.cu -I/usr/include/c++/3.3.4/x86_64-redhat-linux

all: corrcoefAB.cu corrcoef.cu corrcoefmatrix.c corrcoefmatrix.h corrcoefmatrix_kernel.cu corrcoefmatrix_kernel.h sum_sum2_kernel.h sum_sum2_kernel.cu 
	nvcc -o corrcoef corrcoefmatrix.c corrcoefmatrix_kernel.cu corrcoef.cu sum_sum2_kernel.cu -I/usr/include/c++/3.3.4/x86_64-redhat-linux
	nvcc -o corrcoefAB corrcoefmatrix.c corrcoefmatrix_kernel.cu corrcoefAB.cu sum_sum2_kernel.cu -I/usr/include/c++/3.3.4/x86_64-redhat-linux


zip: 
	zip corrcoef.zip *.c *.cu *.h Makefile 

cudaomp: corrcoef_omp.cu corrcoefmatrix_omp.cu corrcoefmatrix_omp.h
	nvcc -Xcompiler -fopenmp -o corrcoef_omp corrcoef_omp.cu corrcoefmatrix_omp.cu -lm -lgomp -I/usr/include/c++/3.3.4/x86_64-redhat-linux 
#	nvcc -Xcompiler -fopenmp -o corrcoef_omp corrcoef_omp.cu corrcoefmatrix_omp.cu -lm -lgomp -I/usr/include/c++/3.3.4/x86_64-redhat-linux --compiler-bindir=/usr/bin/g++4
